package com.learn.controller;

import com.learn.services.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Calendar;

@Controller
public class IndexController {

    @Autowired
    private ArticleService articleService;

    @RequestMapping("/index")
    public String toIndexPage(Model model){
        model.addAttribute("articleList", articleService.selectAllArticle());
        return "client/index";
    }


}
